Deal with broken _NET_WORKAREA more gracefully
authorMatthias Clasen <mclasen@redhat.com>
Sat, 4 Jan 2014 20:15:00 +0000 (15:15 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 4 Jan 2014 20:15:00 +0000 (15:15 -0500)
fvwm seems to have problems keeping _NET_WORKAREA in sync with
the number of desktops. Instead of reading garbage, silently use
the full screen as workarea for desktops that are not covered
by the _NET_WORKAREA property.

https://bugzilla.gnome.org/show_bug.cgi?id=698248

gdk/x11/gdkscreen-x11.c

index 9f09ce11716d249ec3b1fdb79337b8da32baa430..31e5688ab8496e68934dea8daa78e46f685d140f 100644 (file)
@@ -359,6 +359,8 @@ get_work_area (GdkScreen    *screen,
     goto out;
 
   desktop = get_current_desktop (screen);
+  if (desktop + 1 > num / 4) /* fvwm gets this wrong */
+    goto out;
 
   workareas = (long *) ret_workarea;
   area->x = workareas[desktop * 4];